package com.bajiao.entity.recharge;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 充值
 * @Author: FanJq
 * @Date:   2024-10-19
 * @Version: V1.0
 */
@Data
@TableName("user_recharge")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="user_recharge对象", description="充值")
public class Recharge {

	/**主键id*/
	@TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "主键id")
	private String id;
	/**订单编号*/
	@Excel(name = "订单编号", width = 15)
	@ApiModelProperty(value = "订单编号")
	private String orderNo;
	/**用户id*/
	@Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id")
	private String userId;
	/**充值金额*/
	@Excel(name = "充值金额", width = 15)
    @ApiModelProperty(value = "充值金额")
	private BigDecimal rechargeMoney;
	/**支付类型 2-微信 3-支付宝 4-苹果内购*/
	@Excel(name = "支付类型 2-微信 3-支付宝 4-苹果内购", width = 15)
    @ApiModelProperty(value = "支付类型 2-微信 3-支付宝 4-苹果内购")
	private Integer paymentType;
	/**付款编号（每次支付时都需要生成一个新数据，用于第三方支付时订单编号参数）*/
	@Excel(name = "付款编号（每次支付时都需要生成一个新数据，用于第三方支付时订单编号参数）", width = 15)
    @ApiModelProperty(value = "付款编号（每次支付时都需要生成一个新数据，用于第三方支付时订单编号参数）")
	private String paymentNo;
	/**第三方订单号*/
	@Excel(name = "第三方订单号", width = 15)
    @ApiModelProperty(value = "第三方订单号")
	private String outTradeNo;
	/**订单状态1待付款 2已完成 3已关闭*/
	@Excel(name = "订单状态1待付款 2已完成 3已关闭", width = 15)
    @ApiModelProperty(value = "订单状态1待付款 2已完成 3已关闭")
	private Integer orderStatus;
	/**订单付款时间*/
	@Excel(name = "订单付款时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "订单付款时间")
	private Date payTime;
	/**订单完成时间*/
	@Excel(name = "订单完成时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "订单完成时间")
	private Date finishTime;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	private Date createTime;

	/**更新时间*/
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
	private Date updateTime;

	/**赠送金币*/
	@Excel(name = "赠送金币", width = 15)
	@ApiModelProperty(value = "赠送金币")
	private BigDecimal giveAmount;

	/**购买金币*/
	@Excel(name = "购买金币", width = 15)
	@ApiModelProperty(value = "购买金币")
	private BigDecimal amount;

	@ApiModelProperty(value = "支付金额")
	private BigDecimal payPrice;
}
